class RentalModel {
  var address;
  var content;
  var coverUrl;
  var createTime;
  var price;
  var rentalId;
  var status;
  var title;
  var type;
  var updateTime;
  var userId;
  var username;

  RentalModel(
      {this.address,
        this.content,
        this.coverUrl,
        this.createTime,
        this.price,
        this.rentalId,
        this.status,
        this.title,
        this.type,
        this.updateTime,
        this.userId,
        this.username});

  RentalModel.fromJson(Map<String, dynamic> json) {
    address = json['address'];
    content = json['content'];
    coverUrl = json['coverUrl'];
    createTime = json['createTime'];
    price = json['price'];
    rentalId = json['rentalId'];
    status = json['status'];
    title = json['title'];
    type = json['type'];
    updateTime = json['updateTime'];
    userId = json['userId'];
    username = json['username'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['address'] = this.address;
    data['content'] = this.content;
    data['coverUrl'] = this.coverUrl;
    data['createTime'] = this.createTime;
    data['price'] = this.price;
    data['rentalId'] = this.rentalId;
    data['status'] = this.status;
    data['title'] = this.title;
    data['type'] = this.type;
    data['updateTime'] = this.updateTime;
    data['userId'] = this.userId;
    data['username'] = this.username;
    return data;
  }
}